import { useUserInfoStore } from "@/stores/userInfo";
//引入大仓库
import pinia from "@/stores";
//获取小仓库
let userStore = useUserInfoStore(pinia);

export const directives = (app: any) => {
  app.directive("has", {
    mounted(el: any, binding: any) {
        if(!userStore.buttons.includes(binding.value)){
            el.parentNode.removeChild(el)
        }
    },
  });
};
